package cn.com.bluemoon.daps.sync.vo.model2dev;

import cn.com.bluemoon.daps.common.domain.UserPermissionApi;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @author Jarod.Kong
 * @date 2021/7/7 12:05
 */
@ApiModel(description = "开发同步-入参")
public class SyncRequestListVo implements Serializable, UserPermissionApi<String> {

    @Setter
    @Getter
    @ApiModelProperty("模型id")
    @NotNull(message = "模型id不可为空")
    private String modelId;

    @Setter
    @Getter
    @ApiModelProperty("表id")
    @NotEmpty(message = "所选表id不可为空")
    private List<String> tableIds;

    /**
     * @return 获取mvc传输中对应模型的id
     */
    @Override
    public String getUserPermissionKeyValue() {
        return this.modelId;
    }
}
